<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>共享米宝管理后台 - 控制台</title>
    <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/element-ui@2.15.12/lib/theme-chalk/index.css">
    <link rel="stylesheet" href="../assets/css/custom.css">
</head>
<body class="bg-gray-100">
    <div class="admin-container flex">
        <!-- Sidebar -->
        <div class="w-64 bg-gray-800 min-h-screen flex-shrink-0">
            <div class="p-4 text-white">
                <div class="flex items-center mb-6">
                    <i class="fas fa-bolt mr-2 text-yellow-400"></i>
                    <span class="text-lg font-medium">共享米宝管理系统</span>
                </div>
                
                <nav>
                    <a href="index.html" class="block py-2 px-4 rounded bg-gray-700 mb-1">
                        <i class="fas fa-chart-line mr-2"></i> 控制台
                    </a>
                    <a href="users.html" class="block py-2 px-4 rounded hover:bg-gray-700 mb-1">
                        <i class="fas fa-users mr-2"></i> 用户管理
                    </a>
                    <a href="investors.html" class="block py-2 px-4 rounded hover:bg-gray-700 mb-1">
                        <i class="fas fa-user-tie mr-2"></i> 投资人管理
                    </a>
                    <a href="devices.html" class="block py-2 px-4 rounded hover:bg-gray-700 mb-1">
                        <i class="fas fa-battery-full mr-2"></i> 设备管理
                    </a>
                    <a href="revenue.html" class="block py-2 px-4 rounded hover:bg-gray-700 mb-1">
                        <i class="fas fa-money-bill-wave mr-2"></i> 收益管理
                    </a>
                    <a href="commission-settings.html" class="block py-2 px-4 rounded hover:bg-gray-700 mb-1">
                        <i class="fas fa-cog mr-2"></i> 分润设置
                    </a>
                </nav>
            </div>
        </div>

        <!-- Main content -->
        <div class="flex-grow">
            <!-- Header -->
            <header class="bg-white shadow-sm">
                <div class="container mx-auto px-4 py-3 flex justify-between items-center">
                    <h1 class="text-xl font-medium">控制台</h1>
                    <div class="flex items-center">
                        <span class="mr-4">管理员</span>
                        <img class="h-8 w-8 rounded-full" src="https://via.placeholder.com/40" alt="管理员头像">
                    </div>
                </div>
            </header>

            <!-- Page content -->
            <main class="container mx-auto p-4">
                <!-- Stats Row -->
                <div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-6">
                    <div class="bg-white rounded-lg shadow-sm p-6">
                        <div class="flex justify-between items-start">
                            <div>
                                <p class="text-gray-500 text-sm">活跃设备数</p>
                                <h3 class="text-2xl font-bold mt-1">412</h3>
                                <p class="text-green-500 text-xs mt-2">
                                    <i class="fas fa-arrow-up mr-1"></i> 8% 较上月
                                </p>
                            </div>
                            <div class="bg-blue-100 p-3 rounded-full">
                                <i class="fas fa-charging-station text-blue-500"></i>
                            </div>
                        </div>
                    </div>

                    <div class="bg-white rounded-lg shadow-sm p-6">
                        <div class="flex justify-between items-start">
                            <div>
                                <p class="text-gray-500 text-sm">注册用户数</p>
                                <h3 class="text-2xl font-bold mt-1">2,845</h3>
                                <p class="text-green-500 text-xs mt-2">
                                    <i class="fas fa-arrow-up mr-1"></i> 12% 较上月
                                </p>
                            </div>
                            <div class="bg-green-100 p-3 rounded-full">
                                <i class="fas fa-users text-green-500"></i>
                            </div>
                        </div>
                    </div>

                    <div class="bg-white rounded-lg shadow-sm p-6">
                        <div class="flex justify-between items-start">
                            <div>
                                <p class="text-gray-500 text-sm">本月借用次数</p>
                                <h3 class="text-2xl font-bold mt-1">1,286</h3>
                                <p class="text-green-500 text-xs mt-2">
                                    <i class="fas fa-arrow-up mr-1"></i> 15% 较上月
                                </p>
                            </div>
                            <div class="bg-purple-100 p-3 rounded-full">
                                <i class="fas fa-battery-full text-purple-500"></i>
                            </div>
                        </div>
                    </div>

                    <div class="bg-white rounded-lg shadow-sm p-6">
                        <div class="flex justify-between items-start">
                            <div>
                                <p class="text-gray-500 text-sm">本月总收入</p>
                                <h3 class="text-2xl font-bold mt-1">¥25,841</h3>
                                <p class="text-green-500 text-xs mt-2">
                                    <i class="fas fa-arrow-up mr-1"></i> 18% 较上月
                                </p>
                            </div>
                            <div class="bg-yellow-100 p-3 rounded-full">
                                <i class="fas fa-money-bill-wave text-yellow-500"></i>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Revenue Chart and Top Performers -->
                <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
                    <!-- Revenue Chart -->
                    <div class="bg-white rounded-lg shadow-sm p-6">
                        <div class="flex justify-between items-center mb-4">
                            <h2 class="text-lg font-medium">收入趋势</h2>
                            <select class="border border-gray-300 rounded-md px-2 py-1 text-sm">
                                <option>近7天</option>
                                <option>近30天</option>
                                <option>近90天</option>
                            </select>
                        </div>
                        
                        <!-- Placeholder for chart -->
                        <div class="h-64 bg-gray-50 rounded-lg flex items-center justify-center">
                            <div class="text-center">
                                <i class="fas fa-chart-line text-gray-400 text-4xl mb-2"></i>
                                <div class="text-gray-500">收入趋势图表</div>
                            </div>
                        </div>
                    </div>

                    <!-- Top Performers -->
                    <div class="bg-white rounded-lg shadow-sm p-6">
                        <div class="flex justify-between items-center mb-4">
                            <h2 class="text-lg font-medium">收益排行榜</h2>
                            <select class="border border-gray-300 rounded-md px-2 py-1 text-sm">
                                <option>投资人</option>
                                <option>分享用户</option>
                                <option>招商人</option>
                            </select>
                        </div>
                        
                        <div class="space-y-3">
                            <div class="flex justify-between items-center">
                                <div class="flex items-center">
                                    <div class="bg-blue-500 text-white rounded-full w-6 h-6 flex items-center justify-center mr-3">1</div>
                                    <span>张志强</span>
                                </div>
                                <span class="font-medium">¥2,580</span>
                            </div>
                            
                            <div class="flex justify-between items-center">
                                <div class="flex items-center">
                                    <div class="bg-gray-300 text-gray-700 rounded-full w-6 h-6 flex items-center justify-center mr-3">2</div>
                                    <span>李小红</span>
                                </div>
                                <span class="font-medium">¥1,950</span>
                            </div>
                            
                            <div class="flex justify-between items-center">
                                <div class="flex items-center">
                                    <div class="bg-yellow-500 text-white rounded-full w-6 h-6 flex items-center justify-center mr-3">3</div>
                                    <span>王大明</span>
                                </div>
                                <span class="font-medium">¥1,680</span>
                            </div>
                            
                            <div class="flex justify-between items-center">
                                <div class="flex items-center">
                                    <div class="bg-gray-200 text-gray-700 rounded-full w-6 h-6 flex items-center justify-center mr-3">4</div>
                                    <span>赵小华</span>
                                </div>
                                <span class="font-medium">¥1,450</span>
                            </div>
                            
                            <div class="flex justify-between items-center">
                                <div class="flex items-center">
                                    <div class="bg-gray-200 text-gray-700 rounded-full w-6 h-6 flex items-center justify-center mr-3">5</div>
                                    <span>刘晓丽</span>
                                </div>
                                <span class="font-medium">¥1,280</span>
                            </div>
                        </div>
                    </div>
                </div>
            </main>
        </div>
    </div>

    <!-- JavaScript for functionality -->
    <script>
        // Here would be JavaScript code to handle button clicks and interactions
        document.addEventListener('DOMContentLoaded', function() {
            // Add event listeners for buttons
            const buttons = document.querySelectorAll('button');
            buttons.forEach(button => {
                button.addEventListener('click', function(e) {
                    console.log('Button clicked:', this.textContent.trim());
                    // Additional functionality would be added here
                });
            });
            
            // Add event listeners for links
            const links = document.querySelectorAll('a');
            links.forEach(link => {
                link.addEventListener('click', function(e) {
                    // Prevent default only for # links that don't have a real destination
                    if (this.getAttribute('href') === '#') {
                        e.preventDefault();
                        console.log('Link clicked:', this.textContent.trim());
                    }
                });
            });
        });
    </script>
</body>
</html> 